home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_teo_chamblock.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
96 lines
# Jones 3D Cog Script
#
# TEO_Chamblock.cog
#
# Controls Pie_Slice Chamber doors
#
# [SXC]
#
# (C) 1998 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message startup
message activate
message arrived
message timer
message blocked
thing player
thing door0 linkid=0 mask=0x405
thing door1 linkid=0 mask=0x405
thing door2 linkid=0 mask=0x405
thing door3 linkid=0 mask=0x405
thing door4 linkid=0 mask=0x405
thing door5 linkid=0 mask=0x405
thing door6 linkid=0 mask=0x405
thing door7 linkid=0 mask=0x405
thing block0 linkid=1 mask=0x405
thing block1 linkid=1 mask=0x405
float moveSpeed=8.0
float sleepTime=2.0
sector doorSector local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
doorSector = GetThingSector(door0);
SetSectorAdjoins(doorSector, 0);
vecLightValue = VectorSet(lightValueR, lightValueG, lightValueB);
SetSectorLight(doorSector, vecLightValue, 0.0); // add some light to door sector
return;
# ........................................................................................
activate:
if ((GetSenderID() == 1) && (GetCurFrame(door0) == 0))
{
PlayMode(player, 60, 0); // changed from 58
SetSectorAdjoins(doorSector, 1);
MoveToFrame(door0, 1, moveSpeed);
MoveToFrame(block0, 1, (moveSpeed * 2));
MoveToFrame(block1, 1, (moveSpeed * 2));
}
return;
# ........................................................................................
arrived:
if ((GetCurFrame(door0) == 1) && (GetSenderID() == 0))
{
SetTimer(sleepTime);
}
else
{
SetSectorAdjoins(doorSector, 1);
}
return;
# ........................................................................................
blocked:
MoveToFrame(door0, 1, moveSpeed);
return;
# ........................................................................................
timer:
MoveToFrame(door0, 0, moveSpeed);
MoveToFrame(block0, 0, (moveSpeed * 2));
MoveToFrame(block1, 0, (moveSpeed * 2));
return;
# ........................................................................................
end